package com.wuc.test.client;

import java.util.ArrayList;
import java.util.List;

import com.wuc.client.WucEventClient;
import com.wuc.client.domain.EventData;
import com.wuc.client.domain.EventRUser;
import com.wuc.client.domain.Values;
import com.wuc.client.utils.TimeTool;

public class RecordEventTester {

	public static void main(String[] args) {
		Values values = new Values();
		values.setNum2(new Float(1), "一星评价");
		values.setNum1(1.2f, "1.2星评价");
		String objid = "KNOWID";
		String objname = "测试知识";
		String title = "关注知识";
		String modelkey = "FOLLOW_KNOW";
		String note = "事件备注123";
		String ctime14 = TimeTool.getTimeDate14();
		String sysid = "40289f787a0f2b71017a0f49c2ef000e";
		WucEventClient client = new WucEventClient("http://127.0.0.1:8380/wuc", "F59BD65F7EDAFB087A81D4DCA06C4910",
				"apiuser", "111111");
		List<EventRUser> users = new ArrayList<EventRUser>();
		users.add(new EventRUser("OPERATOR", "操作张三", "op1", null, null));
		users.add(new EventRUser("OWNER", "创建张三", "creat2", null, null));
		client.recordEvent(new EventData(objid, objname, modelkey, title, note, sysid, ctime14, values), users);
		System.out.println(client.isLive());
	}

}
